package com.ssm.modules.service.impl;

import com.ssm.modules.dao.IGradeDao;
import com.ssm.modules.entity.Grade;
import com.ssm.modules.service.IGradeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @email: dong980514280@gmail.com
 * @author: HGL
 * @date: 2018/12/26
 * @time: 8:49
 */
@Service("gradeService")
public class GradeServiceImpl implements IGradeService {
    @Autowired
    private IGradeDao gradeDao;

    public List<Grade> selectAll() {
        return gradeDao.selectAll();
    }

    public int addGrade(Grade grade) {
        return gradeDao.addGrade(grade);
    }

    public int updateGrade(Grade grade) {
        return gradeDao.updateGrade(grade);
    }

    public int deleteGrade(int id) {
        return gradeDao.deleteGrade(id);
    }

    public int stuAddGrade(int stuId, int gradeId) {
        return gradeDao.stuAddGrade(stuId, gradeId);
    }
}
